From: Camila Ayres Date: Mon, 27 Jan 2025 13:35:55 +0000 (+0100) Subject: Overwrite the user exclude list when the client is branded. X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~2^2~69^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=417f692ff520bb2b267bb83de8a6424213040b55;p=nextcloud-desktop.git Overwrite the user exclude list when the client is branded. Enforce specific sync-exclude file to all users. Signed-off-by: Camila Ayres --- diff --git a/src/libsync/configfile.cpp b/src/libsync/configfile.cpp index 93e9f2cbf..b1cb4268d 100644 --- a/src/libsync/configfile.cpp +++ b/src/libsync/configfile.cpp @@ -1271,6 +1271,12 @@ void ConfigFile::setupDefaultExcludeFilePaths(ExcludedFiles &excludedFiles) const auto userList = cfg.excludeFile(ConfigFile::UserScope); const auto legacyList = cfg.excludeFile(ConfigFile::LegacyScope); + if (Theme::instance()->isBranded() && QFile::exists(systemList) && QFile::copy(systemList, userList)) { + qCInfo(lcConfigFile) << "Overwriting user list" << userList << "with system list" << systemList; + excludedFiles.addExcludeFilePath(systemList); + return; + } + if (!QFile::exists(userList)) { qCInfo(lcConfigFile) << "User defined ignore list does not exist:" << userList;